<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-for</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="app">
        <ul>
            <li v-for="num in anum">{{num}}</li>
        </ul>

        <table>
            <tr>
                <th>编号</th>
                <th>ID</th>
                <th>书名</th>
                <th>价格</th>
                <th>作者</th>
            </tr>
            <tr v-for="(pro,index) in prolist">
                <td>{{index+1}}</td>
                <td>{{pro.proId}}</td>
                <td>{{pro.proName}}</td>
                <td>{{pro.proPrice}}</td>
                <td>{{pro.Author}}</td>
            </tr>
        </table>
    </div>
    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                anum: [1, 2, 3, 4, 2, 2, 333, 234, 2, 4, 4444],
                prolist: [
                    {
                        "proId": "001",
                        "proName": "红星照耀中国",
                        "proPrice": 10,
                        "Author": "张三",
                        "proImg": "img/1.jpg",
                        "proNum": 0,
                        "checked": false
                    },
                    {
                        "proId": "002",
                        "proName": "半小时读懂唐诗",
                        "proPrice": 20,
                        "Author": "李四",
                        "proImg": "img/2.jpg",
                        "proNum": 0,
                        "checked": false
                    },
                    {
                        "proId": "003",
                        "proName": "万版泉水都是生活",
                        "proPrice": 10,
                        "Author": "张三",
                        "proImg": "img/3.jpg",
                        "proNum": 0,
                        "checked": false
                    },
                    {
                        "proId": "004",
                        "proName": "鲁迅全集",
                        "proPrice": 30,
                        "Author": "鲁迅",
                        "proImg": "img/4.jpg",
                        "proNum": 0,
                        "checked": false
                    }
                ]
            }
        });
    </script>
</body>

</html>